<%@ page language="java" import="java.util.*" contentType="text/html;charset=utf-8" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<base href="<%=path%>">
<title>考试系统</title>
<style type="text/css">
<!--
body {
	margin-left: 3px;
	margin-top: 0px;
	margin-right: 3px;
	margin-bottom: 0px;
}
.STYLE1 {
	color: #e1e2e3;
	font-size: 12px;
}
.STYLE6 {color: #000000; font-size: 12; }
.STYLE10 {color: #000000; font-size: 12px; }
.STYLE19 {
	color: #344b50;
	font-size: 12px;
}
.STYLE21 {
	font-size: 12px;
	color: #3b6375;
}
.STYLE22 {
	font-size: 12px;
	color: #295568;
}
-->

</style>
<script language="javascript">

	function downIn(testid){
		var fileName = "in";
		window.location.href = "<%=path %>/FileDownLoad/downloadData.action?id="+testid+"&fileName="+fileName+"&proid=${program.id }";
		
	}
	function downOut(testid){
		var fileName = "out";

		window.location.href = "<%=path %>/FileDownLoad/downloadData.action?id="+testid+"&fileName="+fileName+"&proid=${program.id }";
		
	}
	
	

</script>
</head>
<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="24" bgcolor="#353c44"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="6%" height="19" valign="bottom"><div align="center"><img src="images/tb.gif" width="14" height="14" /></div></td>
                <td width="94%" valign="bottom"><span class="STYLE1"> 修改编程题</span></td>
              </tr>
            </table>
            </td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
  <td>
    <form action="<%= request.getContextPath() %>/Teacher/TeacherAction!updatesave.action" method="post"  enctype="multipart/form-data">
    <input type="hidden" name="programming.id" value="${program.id }"/>
	<table width="70%" border="0" cellpadding="0" cellspacing="1" bgcolor="#a8c7ce">
		<tr>
			 <td width="35%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">编程题的标题 </span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <input type="text" name="programming.title" size="50" value="${program.title }"/> </div></td>
		</tr>
		<tr>
			 <td width="35%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">编程题的题目</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="center"> <textarea name="programming.content"  cols="100" rows="15" >${program.content }</textarea> </div></td>
		</tr>
		<tr>
			 <td width="35%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">输入描述</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <textarea name="programming.inputdescribe" cols="100" rows="10">${program.inputdescribe }</textarea> </div></td>
		</tr>
		<tr>
			 <td width="35%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">输出描述</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <textarea name="programming.outputdescribe" cols="100" rows="10">${program.outputdescribe }</textarea> </div></td>
		</tr>
		<tr>
			 <td width="35%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">输入样例</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <textarea name="programming.inputsample" cols="100" rows="10">${program.inputsample }</textarea> </div></td>
		</tr>
		<tr>
			 <td width="35%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">输出样例</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <textarea name="programming.outputsample" cols="100" rows="10">${program.outputsample }</textarea> </div></td>
		</tr>
		
		
		
		
		<s:if test="#session.program.prefix!=null">
		
		<tr>
             <td width="35%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">前面代码</span></div></td>
             <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <textarea name="programming.prefix" cols="100" rows="10">${program.prefix }</textarea> </div></td>
        </tr>
        <tr>
             <td width="35%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">后面代码</span></div></td>
             <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <textarea name="programming.postfix" cols="100" rows="10">${program.postfix }</textarea> </div></td>
        </tr>
        
      	</s:if>
        
        
        
        
		
		
		<s:set  value="set" name="list" ></s:set>
		<tr>
			 <td width="35%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">测试用例1输入</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <input type="file" name="upload0" /> </div></td>
			 
			 <s:if test="0 in #list">
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <input type="button" value="down1" onclick="downIn(0)" /> </div></td>
			 </s:if>
		</tr>
		
		<tr>
			 <td width="35%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">测试用例1输出</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <input type="file" name="upload1" /> </div></td>
			 
			 <s:if test="0 in #list">
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <input type="button" value="down1" onclick="downOut(0)" /> </div></td>
			 </s:if>
		
		</tr>
		<tr>
			 <td width="35%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">测试用例2输入</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <input type="file" name="upload2" /> </div></td>
			 <s:if test="1 in #list">
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <input type="button" value="down2" onclick="downIn(1)" /> </div></td>
			 </s:if>
		</tr>
		<tr>
			 <td width="35%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">测试用例2输出</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <input type="file" name="upload3" /> </div></td>
			 <s:if test="1 in #list">
			 	<td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <input type="button" value="down2" onclick="downOut(1)" /> </div></td>
			 </s:if>
		</tr>
		<tr>
			 <td width="35%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">测试用例3输入</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <input type="file" name="upload4" /> </div></td>
			 <s:if test="2 in #list">
			 	<td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <input type="button" value="down3" onclick="downIn(2)" /> </div></td>
			 </s:if>
		</tr>
		<tr>
			 <td width="35%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">测试用例3输出</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <input type="file" name="upload5" /> </div></td>
			 <s:if test="2 in #list">
			 	<td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <input type="button" value="down3" onclick="downOut(2)" /> </div></td>
			 </s:if>
		</tr>
		<tr>
			 <td width="35%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">测试用例4输入</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <input type="file" name="upload6" /> </div></td>
			 <s:if test="3 in #list">
			 	<td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <input type="button" value="down4" onclick="downIn(3)" /> </div></td>
			 </s:if>
		</tr>
		<tr>
			 <td width="35%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">测试用例4输出</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <input type="file" name="upload7" /> </div></td>
			 <s:if test="3 in #list">
			 	<td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <input type="button" value="down4" onclick="downOut(3)" /> </div></td>
			 </s:if>
		</tr>
		<tr>
			 <td width="35%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">测试用例5输入</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <input type="file" name="upload8" /> </div></td>
			 <s:if test="4 in #list">
			 	<td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <input type="button" value="down5" onclick="downIn(4)" /> </div></td>
			 </s:if>
		</tr>
		<tr>
			 <td width="35%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">测试用例5输出</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <input type="file" name="upload9" /> </div></td>
			 <s:if test="4 in #list">
			 	<td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <input type="button" value="down5" onclick="downOut(4)" /> </div></td>
			 </s:if>
		</tr>
		<tr>
			 <td width="35%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">是否公开</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"><select name="programming.visible">
      				<option value="1" <c:if test='${program.visible==1}'>selected</c:if> >私有</option>
      				<option value="0" <c:if test='${program.visible==0}'>selected</c:if> > 公开</option>
      			</select></div></td>
		</tr>
		<tr>
			 <td width="35%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">c运行时间（秒） </span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <input type="text" name="programming.runtime" size="50" value="${program.runtime }"/> </div></td>
		</tr>
		<tr>
			 <td width="35%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">java运行时间（秒） </span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <input type="text" name="programming.runtimeforjava" size="50" value="${program.runtimeforjava }" /> </div></td>
		</tr>
		<tr>
			 <td width="35%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">c内存限制（Kb） </span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <input type="text" name="programming.memoryforc" size="50" value="${program.memoryforc }"/> </div></td>
		</tr>
		<tr>
			 <td width="35%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">java内存限制（Kb） </span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left"> <input type="text" name="programming.memoryforjava" size="50" value="${program.memoryforjava }"/> </div></td>
		</tr>
		<tr>
			 <td width="35%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">分数</span></div></td>
			 <td height="20" bgcolor="#FFFFFF" class="STYLE19"><div align="left">      
			 <select name="programming.score">
			 		<option value="1" <c:if test='${program.score==1}'>selected</c:if>>1</option>
				    <option value="2" <c:if test='${program.score==2}'>selected</c:if>>2</option>
				    <option value="3" <c:if test='${program.score==3}'>selected</c:if>>3</option>
				    <option value="4" <c:if test='${program.score==4}'>selected</c:if>>4</option>
				    <option value="5" <c:if test='${program.score==5}'>selected</c:if>>5</option>
				    <option value="6" <c:if test='${program.score==6}'>selected</c:if>>6</option>
				    <option value="8" <c:if test='${program.score==8}'>selected</c:if>>8</option>
				    <option value="10" <c:if test='${program.score==10}'>selected</c:if>>10</option>
				    <option value="12" <c:if test='${program.score==12}'>selected</c:if>>12</option>
				    <option value="15" <c:if test='${program.score==15}'>selected</c:if>>15</option>
				    <option value="18" <c:if test='${program.score==18}'>selected</c:if>>18</option>
				    <option value="20" <c:if test='${program.score==20}'>selected</c:if>>20</option>
				    <option value="25" <c:if test='${program.score==25}'>selected</c:if>>25</option>
				    <option value="30" <c:if test='${program.score==30}'>selected</c:if>>30</option>
				    <option value="35" <c:if test='${program.score==35}'>selected</c:if>>35</option>
				    <option value="40" <c:if test='${program.score==40}'>selected</c:if>>40</option>
				</select>
			 </div></td>
		</tr>
		<tr>
			<td width="35%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10"><input type="submit" value="提交" /></span></div></td>
			    
		</tr>
	</table>
	</form>
  </td>
  </tr>
</table>	
    	
</body>
</html>
